Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NBSNEBIUS-148: implement throttling for fast data path #838

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

budevg
Copy link
Collaborator

@budevg budevg commented Mar 27, 2024

No description provided.

@budevg budevg requested review from tpashkin and sharpeye March 27, 2024 17:15
Copy link
Contributor

Note

This is an automated comment that will be appended during run.

🔴 linux-x86_64-relwithdebinfo: some tests FAILED for commit f6c268e.

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
5069 5066 0 3 0 0

@budevg budevg force-pushed the users/evgenybud/fast-datapath-throttling branch from f6c268e to 3aa34cf Compare March 28, 2024 09:31
Copy link
Contributor

Note

This is an automated comment that will be appended during run.

🔴 linux-x86_64-relwithdebinfo: some tests FAILED for commit 3aa34cf.

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
5067 5066 0 1 0 0

Copy link
Contributor

Note

This is an automated comment that will be appended during run.

🔴 linux-x86_64-relwithdebinfo: some tests FAILED for commit 3aa34cf.

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
5067 5066 0 1 0 0

🟢 linux-x86_64-relwithdebinfo: all tests PASSED for commit 3aa34cf.

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
5069 5065 0 0 2 2

@@ -60,6 +61,10 @@ vhd_bdev_info TNullBackend::Init(const TOptions& options)
void TNullBackend::Start()
{}

void TNullBackend::PrepareStop()
{
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А в Start и Stop используется {}. Давай сделаем одинаково

@@ -278,6 +279,10 @@ void TAioBackend::Start()
CompletionThread = std::thread([this] { CompletionThreadFunc(); });
}

void TAioBackend::PrepareStop()
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Давай здесь тоже сделаем {}

for (ui32 i = 0; i < options.QueueCount; i++) {
Throttlers.push_back(CreateThrottler(
Timer,
options.MaxReadBandwidth / options.QueueCount,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А мы точно хотим безусловно резать полосу между очередями? Может всё-таки сделать один тротлер?

Если очередей насоздавали, но по какой-то причине не утилизируют, то мы занизим скорость пользователю в разы. А если будет даже небольшой дисбаланс, пользователь хотя бы получит всю свою полосу

private:
ITimerPtr Timer;
TLeakyBucket Bucket;
ui32 MaxReadBandwidth;
Copy link
Collaborator

@tpashkin tpashkin Apr 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const? Я не знаю есть ли от этого реальная польза, но последнее время мы что-то везде добавляем 🤷

, MaxReadIops(maxReadIops)
, MaxWriteBandwidth(maxWriteBandwidth)
, MaxWriteIops(maxWriteIops)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лишний певод строки

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants